

<script>
export default{
  data(){
    return {
      collapsed:false
    }
  }
}


</script>

<template>
    <t-layout>
      <t-header>
        <t-head-menu theme="light" value="item1" height="120px">
          <template #logo>
            <img width="136" class="logo" src="https://www.tencent.com/img/index/menu_logo_hover.png" alt="logo" />
          </template>
          <t-menu-item value="item1"> <router-link to="/">首页</router-link> </t-menu-item>
          <t-menu-item value="item2"> <router-link to="/addadvice">我要分享建议</router-link></t-menu-item>

          <template #operations>
            <router-link to="/addadvice"><t-icon class="t-menu__operations-icon" name="add-rectangle" /></router-link>
            <router-link to="/"><t-icon class="t-menu__operations-icon" name="home" /></router-link>
            <router-link to="/userLogin"><t-icon class="t-menu__operations-icon" name="user" /></router-link>
          </template>
        </t-head-menu>

      </t-header>


      <t-layout>
        <t-aside>
          <t-menu theme="light" default-value="item2" :collapsed="collapsed" @change="changeHandler">
            <t-menu-group title="主导航">
              <t-menu-item value="item1">
                <template #icon>
                  <t-icon name="app" />
                </template>
                仪表盘
              </t-menu-item>
            </t-menu-group>
            
            
            <t-menu-group title="应用项">
              <t-submenu title="列表项" value="2-1">
                <template #icon>
                  <t-icon name="server" />
                </template>
                <t-menu-item value="2-1-1">基础列表项</t-menu-item>
                <t-menu-item value="2-1-2">卡片列表项</t-menu-item>
                <t-menu-item value="2-1-3">筛选列表项</t-menu-item>
                <t-menu-item value="2-1-4">树状筛选列表项</t-menu-item>
              </t-submenu>
              <t-menu-item value="2-2">
                <template #icon>
                  <t-icon name="edit-1" />
                </template>
                表单项
              </t-menu-item>
              <t-menu-item value="2-3" @click="this.$router.push('/OhlcChart')">
                <template #icon>
                  <t-icon name="chart" />
                </template>
                走势图
              </t-menu-item>
              <t-menu-item value="2-3" @click="this.$router.push('/chart')">
                <template #icon>
                  <t-icon name="chart" />
                </template>
                图表
              </t-menu-item>
              <t-menu-item value="2-4">
                <template #icon>
                  <t-icon name="check" />
                </template>
                结果页
              </t-menu-item>
            </t-menu-group>
            <t-menu-group title="更多">
              <t-menu-item value="item3" @click="this.$router.push('/register')">
                <template #icon>
                  <t-icon name="user" />
                </template>
                用户注册
              </t-menu-item>
              <t-menu-item value="item4" @click="this.$router.push('/userLogin')">
                <template #icon>
                  <t-icon name="login" />
                </template>
                登录页
              </t-menu-item>
            </t-menu-group>

            <t-menu-item value="item4" @click=" () => this.collapsed =!this.collapsed">

                    <template #icon><t-icon name="view-list" /></template>
          </t-menu-item>

          </t-menu>


        </t-aside>
        
        <t-content>
          <!---页面视图-->
          <router-view></router-view>
        </t-content>
      </t-layout>

      <t-footer>
        <div class="text-sm text-gray-600 text-center">
          Copyright @ 2019-{{ new Date().getFullYear() }} Tencent. All Rights Reserved
        </div>
      </t-footer>
    </t-layout>
</template>
